<%@page import="ed.model.Utilisateur"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%
    Utilisateur currentuser=null;
    if (session != null) {
        currentuser=(Utilisateur) session.getAttribute("user");
    }
 
    %>
<!DOCTYPE html>
<html>
    <head>
        
    <style>
            body {
                font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
                font-size: 13px;
                color: #6E6E6E;
                background: #f2f5f7;    

            }
            /* Page */
            #page {
                width: 1000px;
                padding: 20px;
                box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;  
                -moz-box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;  
                -webkit-box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;
                background: #fff;
                margin: 0 auto;
                -moz-border-radius: 20px;
                -webkit-border-radius: 20px;
                border-radius: 10px;
            }
            #logo{
                width: 100%;
                height: 100px;
                box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;  
                -moz-box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;  
                -webkit-box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;
                background: #fff;
                margin: 0 auto;
                -moz-border-radius: 20px;
                -webkit-border-radius: 20px;
                border-radius: 5px;
            }

            #menu{
                width: 100%;
                height: 30px;
                box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;  
                -moz-box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;  
                -webkit-box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;
                background: #fff;
                margin: 0 auto;
                margin-top: 20px;
                -moz-border-radius: 20px;
                -webkit-border-radius: 20px;
                border-radius: 1px;
            }

            #clear{
                clear: both;
            }

            #content {
                margin: 0 auto;
                width: 100%
            }

            #content-right {
                margin-top: 20px;
                float: right;
                width: 80%;
            }

            #content-left {
                margin-top: 20px;
                float: left;
                width: 18%;

/*                border: 1px solid black;*/
            }
            #footer {
                clear:both;
                margin-top: 20px;
                width: 100%;
                text-align:center;
                clear:both;
            }
            
        #menuleft * { 
            padding:0; 
            margin: 0; 
            font-size: 13px ; 
            list-style-type:none;
        }
        #menuleft { 
            width: 58.5%;
            margin: 0 auto;
            float: left;
            line-height: 10px; 
            padding: 0px;
            }
        #menuright { 
            width: 30.5%;
            margin: 0 auto;
            float: right;
            line-height: 10px; 
            padding: 0px;
            text-align: right;
            padding-top:8px;
            padding-right: 5px;
            font-weight: bold;
            font-size: 14px;
            
        }
        #menuleft a {
            display: block; 
            text-decoration: none; 
            color: black;}
        #menuleft a:hover { background: #293160;    color: white;}
        #menuleft ul li {
            padding: 0px;
            margin: 0px;
            list-style-type:none;
            float: left; 
            font-weight: bold;  
            border-right: solid 1px #283923; 
            background: #FFF;}
        #menuleft ul li a { 
            font-weight: bold;
            padding: 10px 5px;
        }
        #menuleft li{ 
            position:relative; 
            float:left;}
        #menuleft ul li ul, #menuleft:hover ul li ul, #menuleft:hover ul li:hover ul li ul{ 
            display:none;
            list-style-type:none; 
            width: 140px;}
        #menuleft:hover ul, #menuleft:hover ul li:hover ul, #menuleft:hover ul li:hover ul li:hover ul { 
            display:block;}
        #menuleft:hover ul li:hover ul li:hover ul { 
            position: absolute;
            margin-left: 145px;
            margin-top: -22px;
            font: 10px;}
        #menuleft:hover ul li:hover ul { 
            position: absolute;
            margin-top: 1px;
            font: 10px;
        }
        #menuleft>ul>li:hover>ul { 
            bottom:100%;
            border-bottom: 1px solid transparent
        }
        #content-form{
            margin: 0 auto;
            text-align: center;
            box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;  
                -moz-box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;  
                -webkit-box-shadow: rgba(0,0,0, 0.45) 0px 0px 5px;
                background: #fff;
                margin: 0 auto;
                -moz-border-radius: 20px;
                -webkit-border-radius: 20px;
                border-radius: 1px;
        }
        h2{
            margin:0px;
            padding-top: 5px;
        }
        #font-a{
            font-size: 14px;
        }
    </style>
        
        <jsp:include page="WEB-INF/jspf/header.jsp">
            <jsp:param name="title" value="EntrepotDocumentaire" />
        </jsp:include>
    </head>
    
    
    <body>
        <!-- Page -->
        <div id="page">
            <!-- Header -->
            <div id="logo">
                <img src="picture.jpg" id="logo" alt="logo" title="logo"/>
            </div>

            <!-- Corps -->
            <div id="content">

                <!-- Menu -->
                <div id="menu">
                    <div id="menuleft" >
            <ul>
                <li style="width:15%"><center>
                        <span style="text-align: center;"><a href="index.jsp">Accueil</a></span></center>
                    
                  </li>
                <% if(currentuser == null){%>
                
                   <li style="width:18%"><center>
                        <span style="text-align: center;"><a href="connexion">Connexion</a></span></center>
                    
                  </li>
                  <li style="width:23%"><center>
                        <span style="text-align: center;"><a href="creercompte">Création compte</a></span></center>
                    
                  </li>
                  <% }else { %>
                  <li style="width:18%"><center>
                        <span style="text-align: center;"><a href="">Compte</a></span></center>
                  </li>
                  <li style="width:18%"><center>
                        <span style="text-align: center;"><a href="deposerdocument">Déposer</a></span></center>
                  </li>
                  <li style="width:18%"><center>
                        <span style="text-align: center;"><a href="">Historique</a></span></center>
                  </li>
                  <% if(currentuser.getCatUtilisateur().equals("Admin")){%>
                  <li style="width:20%"><center>
                        <span style="text-align: center;"><a href="">Paramétrage</a></span></center>
                  </li>
                <% }
                  } %>
                  
            </ul>
        </div>
                    <div id="menuright" >
                        <% if(currentuser!= null){%>
                        Bienvenu <%= currentuser.getNomUtilisateur() %>,  <a href="deconnexion">Déconnexion</a>
                        <% } %>
                    </div>

                </div>
                <div id="cl"></div>
                <!-- Left -->
               <div id="content-left">
                   <div id="content-form">
                       <jsp:include page="WEB-INF/jspf/listecatdoc.jsp" />
                   </div>
              
                </div>

                <!-- Right -->
                <div id="content-right">
                    <% String view_right = (String) request.getAttribute("view_right");
                    
                    if(view_right == null || view_right.equals("index")){ %>
                    
                    <%}else if (view_right.equals("creercompte")) {%>
                            <jsp:include page="WEB-INF/jspf/creercompte.jsp" />
                    <%} else if (view_right.equals("connexion")) {%>
                            <jsp:include page="WEB-INF/jspf/connexion.jsp" />
                    <%}%>
                </div>
            </div>
            
            <!-- Pied de page -->
            <div id="footer">
               <jsp:include page="WEB-INF/jspf/footer.jsp" />
            
            </div>
            <!-- Fin -->
        </div>
               <jsp:include page="js.inc.jsp" />
    </body>
</html>
